// @File:           @File test_redis.c
// @ProjectName:    mosquitto_auth_plugin
// @Description:    ${description}
// @Author:         wujehy
// @Email:          wujehy@qq.com
// @Time:           2021-03-16 18:36

#include <iostream>
#include "RedisTool.h"
#include "Logger.h"
int main() {
    gDebug<<"start";
//    std::string host = "127.0.0.1";
//    int port = 6379;
    RedisTool redisTool;
//    redisTool.setHost(host);
//    redisTool.setPort(port);
    int ret  = redisTool.init();
    if (ret != 0 )
    {
        gError<<"初始化redis失败";
        return -1;
    }

    int key1 = redisTool.setKey("test" , "test2");
    gError<<" ret " << key1;
    int key2 = redisTool.setKey("test2" , "test2" ,10);
    gDebug<<" ret " << key2;

    return 0;
}